#!/usr/bin/python3
# -*-coding:utf-8 -*-
'''

a = input('请输入你喜欢的自然数: ')
b=int(a)
total = 0
for i in range(b+1):
    total = i+total
print(total)
1.借书
2.还书
3.查询书名/作者
4.查看所有
5.退出
选择你的操作:"

'''
import arrow
import time
utc=arrow.utcnow()
print(utc)

library = [
    {'bookname': '西游记', 'author': '吴晨恩', 'price': 100, 'number': 40},
    {'bookname': '水浒传', 'author': '施耐庵', 'price': 100, 'number': 40},
    {'bookname': '红楼梦', 'author': '曹雪芹', 'price': 100, 'number': 40},
    {'bookname': '西游记', 'author': '吴成恩', 'price': 100, 'number': 40},
]
while True:
    time.sleep(3)
    print('欢迎进入陇县图书免费阅读系统!')
    oper = input('\n1.借书\n2.还书\n3.查询\n4.查看所有\n5.退出\n请选择你需要的服务:')
    if oper == '1':
        print('1.借书模块')

    elif oper == '2':
        print('2.还书模块')

    elif oper == '3':
        print('3.查询模块(书名/作者)')
        for book in library:
            print(f"书名:{book['bookname']},作者:{book['author']}")

    elif oper == '4':
        print('4.查看所有模块')
        for book in library:
            print(f"图书名:{book['bookname']},作者:{book['author']},价格:{book['price']},数量:{book['number']}")

    elif oper == '5':
        print('5.退出')
        print('系统正常退出')
        break
    else:
        print('请从新选择')
